<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			var str = '12ad67bc232jkd454';//[12,67,232]
			function getNum(str){
				var newArr = [];
				var num = '';
				for(var i=0;i<str.length;i++){
					var eve = str.charAt(i);
					if(!isNaN(eve)){//是一个数字
						num += eve;
					}else{//不是一个数字
						if(num){
							newArr.push(num);
							num = '';
						}
					}
				}
				if(num){
					newArr.push(num);
				}
				return newArr;
			}
			var re = getNum(str);
			console.log(re);
			
			var reg = /\d+/g;
			var re = str.match(reg);
			console.log(re);
//			正则就是对字符串进行操作
		</script>
	</head>
	<body>
		
	</body>
</html>
